#include <iostream>
#include <vector>
using namespace std;
void moveZeroes(vector<int> &nums) 
{
    size_t cur = 0;
    int dest = -1;
    while(cur < nums.size())
    {
        if(nums[cur])
        {
            swap(nums[cur], nums[++dest]);
        }
        cur++;
    }
}
int main()
{
    vector<int> v = {0, 1, 0, 1, 3, 12};
    moveZeroes(v);
    return 0;
}